package com.ljfresh.customer.result;

import com.ljfresh.customer.exception.ErrorMap;
import com.ljfresh.customer.page.PageResult;
import com.ljfresh.customer.pojo.AbnormalGoods;
import com.ljfresh.customer.pojo.ErpGoods;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author: Lucifer
 * @time: 2020/4/8-9:38
 */

@ApiModel("调入ERP商品返回类")
@Data
@NoArgsConstructor
public class ErpGoodsResult extends Result {
    @ApiModelProperty()
    private PageResult<ErpGoods> data;

    public ErpGoodsResult(Integer code){
        this.code = code;
        this.message = ErrorMap.map.get(code);
    }

    public ErpGoodsResult(PageResult<ErpGoods> data){
        this.data = data;
        this.code = 0;
        this.message = "请求成功";
    }

    public static void main(String[] args) {
        boolean annotationPresent = Result.class.isAnnotationPresent(ApiModel.class);
        System.out.println(annotationPresent);
    }
}
